#!usr/bin/env python  
# -*- coding: utf-8 -*-
""" 
@author:Simon
@file: objdemo14.py 
@time: 2018/01/19 
"""
class FooError(ValueError):
    print('报错了哦')
    pass

def foo(s):
    n = int(s)

    if n ==0:
        # raise FooError('invalid value: %s' %s)
        raise ValueError('不能为0')
    return 10 /0;

foo(0)